<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:include="public/page_css::page_css ('货品种类新增')" />

<body>
<div class="layui-fluid larry-wrapper">
    <div class="layui-row layui-col-space30">
        <div class="layui-col-xs24">
            <section class="panel panel-padding">
                <form id="form1" class="layui-form layui-form-pane" action="">
                    <div>&nbsp;</div>
                    <!--<div class="layui-form-item">
                        <label class="layui-form-label">种类名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="mc" placeholder="种类名称" lay-verify="required" autocomplete="off" class="layui-input "/>
                        </div>
                    </div>-->

                    <div class="layui-inline">
                        <label class="layui-form-label">种类名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="mc" id="mc" lay-verify="required" autocomplete="off" placeholder="请输入种类名称" class="layui-input" style="width: 189px">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label" data-title>货品混放</label>
                        <div class="layui-input-inline">
                            <select name="sfhf" lay-filter="bom">
                                <option value="0">否</option>
                                <option value="1">是</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" jq-filter="submit" lay-submit="" lay-filter="addKuQu">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
<!--<form id="form" class="layui-form layui-form-pane" action="" >
    <div class="layui-form-item" id="simplewizardinwidget-steps">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top:1px;">

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">种类名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="mc" id="mc" lay-verify="required" autocomplete="off" placeholder="请输入种类名称" class="layui-input" style="width: 189px">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" data-title>货品混放</label>
                    <div class="layui-input-inline">
                        <select name="sfhf" lay-filter="bom">
                            <option value="0">否</option>
                            <option value="1">是</option>
                        </select>
                    </div>
                </div>
            </div>
        </fieldset>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" jq-filter="submit"  lay-filter="addKuQu">保存</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>-->
</body>
<div th:include="public/public_js::public_js"></div>

<script th:inline="javascript">
    $(function () {

    })

</script>
<script>
    layui.use(['myform','zzpUtils','form','jquery'],function () {
        var form = layui.form,
            zzpUtils = layui.zzpUtils,
            $ = layui.jquery;

        form.on("submit(addKuQu)",function(data){
            zzpUtils.confirm("是否确定添加",function(index){
                zzpUtils.action({
                    url:"/wmsgoodstype/goodsAdd",
                    data:JSON.stringify(data.field),
                    success:function (data) {
                        setTimeout(function(){
                            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                            parent.layer.close(index); //再执行关闭
                            top.layer.msg(data.title+data.message);
                        },500);
                    },error: function (xhr, textStatus) {
                        console.log(textStatus);
                        console.log(xhr);
                    }
                })
            })
            return false;
        });
    });
</script>
</html>